﻿#region Using declarations
using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Strategy;
#endregion

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
    partial class Strategy
    {
        ///Returns the dollar value of the largest closed-out winning trade.
        public double LargestWinTrade()
        {
            double ProfitCurrency = 0;
            foreach (Trade trade in Performance.AllTrades.WinningTrades)
                if (trade.ProfitCurrency > ProfitCurrency)
                    ProfitCurrency = trade.ProfitCurrency;
            return ProfitCurrency;
        }

    }
}
